/*	
	ArmorChitin.h
	(c)2007 Palestar, Robert Kelford
*/

#ifndef ARMOR_CHITIN_H
#define ARMOR_CHITIN_H

#include "Game/GadgetArmor.h"



//----------------------------------------------------------------------------

class ArmorChitin : public GadgetArmor
{
public:
	DECLARE_WIDGET_CLASS();

	// NounGadget interface
	int	addValue() const
	{
		return 10000;
	}
	Type type() const
	{
		return ARMOR;
	}
	int buildTechnology() const
	{
		return 75;
	}
	int	buildCost() const
	{
		return 700;
	}
	dword buildFlags() const
	{
		return NounPlanet::FLAG_METALS;
	}
	int	buildTime() const
	{
		return 630;
	}
	// GadgetArmor interface
	bool canDeflect( dword nType ) const
	{
		return (nType & (DAMAGE_KINETIC | DAMAGE_ENERGY | DAMAGE_EMP)) != 0;
	}
	int	maxArmor() const
	{
		return (modifier() * (17120 + (4075 * level()))) * enhancementModifier( enhancementSystem(), NounEnhancement::MT_INCREASE );
	}//Add 2000 -JBUD-
	float damageModifier( dword nType ) const
	{
		if ( nType & (DAMAGE_ENERGY) )
			return 1.4f;		// energy/emp damage is more effective against this armor type
		if ( nType & (DAMAGE_KINETIC) )
			return 0.5f;		// more effective against kinetic damage
		return 1.0f;
	}
	int	repairRate() const
	{
		return maxArmor() / 1500;
		//return 30; // Returned to leveled Armor regen -JBUD-
	}
};

//----------------------------------------------------------------------------



#endif

//----------------------------------------------------------------------------
// EOF
